<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/commons/taglibs.jsp" %>
<SCRIPT type="text/javascript">
	$(document).ready(function(){
		$("#bankCode").bind("change", function(){
			var selName = $("#bankCode").find("option:selected").text();
			//alert(selName);
			$("#bankName").val(selName);
		})
		
		
		$("#btn1").bind("click",function(){
			var selName = $("#bankCode").find("option:selected").text();
			$("#bankName").val(selName);
			$("#interestFrom").submit();
		})
	})
//选择事件
function S_NodeCheck(e, treeId, treeNode) {
    var zTree = $.fn.zTree.getZTreeObj(treeId),
        nodes = zTree.getCheckedNodes(true)
    var ids = '', names = ''
    
    for (var i = 0; i < nodes.length; i++) {
        ids   += ','+ nodes[i].id
        names += ','+ nodes[i].name
    }
    if (ids.length > 0) {
        ids = ids.substr(1), names = names.substr(1)
    }
    $("#staffNum").val(ids);
    var $from = $('#'+ treeId).data('fromObj')
    
    if ($from && $from.length) $from.val(names)
}
//单击事件
function S_NodeClick(event, treeId, treeNode) {
    var zTree = $.fn.zTree.getZTreeObj(treeId)
    
    zTree.checkNode(treeNode, !treeNode.checked, true, true)
    
    event.preventDefault()
}
</SCRIPT>	
<div class="bjui-pageContent">
    <form  id="interestFrom" action="${ctx}/management/customer/interest/update.do" data-toggle="validate" data-reload-navtab="true">
      <input type="hidden" name="custId" value="${vo.custId}">
        <input type="hidden" name="intID" value="${vo.intID}">
     <div class="pageFormContent" data-layout-h="0">
            <table class="table table-condensed table-hover" width="100%">
                <tbody>
                	  <tr>
                	 	<td colspan="2">
                            <label class="control-label x100">受益人姓名：</label>
                            <input type="text" name="interestName"  data-rule="required" value="${vo.interestName}" size="30">
                        </td>
                 	   </tr>
                	  <tr>
                	 	<td colspan="2">
                            <label class="control-label x100">身份证号：</label>
                            <input type="text" name="identityNum" data-rule="required" value="${vo.identityNum}" size="30" >
                        </td>
                       </tr>
                	  <tr>
                	 	<td colspan="2">
                            <label class="control-label x100">联系电话：</label>
                            <input type="text" name="linkPhone"  data-rule="required" value="${vo.linkPhone}" size="30">
                        </td>
                      </tr>
                   
                	<tr>
                	 	<td colspan="2">
                            <label class="control-label x100">银行名称：</label>
                               <input type="hidden" id="bankName" name="bankName" value="${vo.bankName}" size="30">
                           <select class="selectpicker show-tick" name="bankCode" id="bankCode" data-width="200"  data-rule="required"  data-toggle="selectpicker" >
                           		<c:forEach var="paramObj" items="${SYS_BANKNAME}">
                           			 <option value="${paramObj.value2}" <c:if test="${paramObj.value2 eq vo.bankCode}">selected="selected"</c:if>>${paramObj.value1}</option>
                            	 </c:forEach>
	                        </select>
                        </td>
                    </tr>
                 	
                	 <tr>
                	 	<td colspan="2">
                            <label class="control-label x100">银行卡号：</label>
                            <input type="text" name="bankAccount" value="${vo.bankAccount}" size="30">
                        </td>
                     </tr>
                 	
                </tbody>
            </table>
        </div>
    </form>
</div>

<div class="bjui-pageFooter">
    <ul>
        <li><button type="button" class="btn-close" data-icon="close">关闭</button></li>
        <li><button type="button" id="btn1" class="btn-default" data-icon="save">保存</button></li>
    </ul>
</div>